import Mock from 'mockjs'
import { mainCateData } from '../mock/category'
import { BannerData, DetailData ,QueryOneData } from '../mock/goodsDetail'

//  获取分类页面主菜单及每一级商品对应商品数据
 
Mock.mock('http://101.33.243.167/api/sideMainCategory', 'get', () => {
    const data = mainCateData
    return {
        code: 200,
        data
    }
})

// 获取商品详情轮播图数据
Mock.mock('http://101.33.243.167/api/detailBanners', 'get', () => {
    const data = BannerData
    return {
        code: 200,
        data
    }
})
// 获取商品详情商品详细信息
Mock.mock('http://101.33.243.167/api/goodsDetailById', 'get', () => {
    const data = DetailData
    return {
        code: 200,
        data
    }
})

// 根据id获取对应商品信息
Mock.mock('http://101.33.243.167/api/queryGoodById', 'get', () => { 
      const  data = QueryOneData
    return {
        code: 200,
        data
    }
})